import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    name:'用户管理',
    component: () => import('../views/Index.vue'),
    children:[
      {
        path: '/Page1',
        name:'查询用户',
        component: () => import('../views/Querry.vue'),
      },
      {
        path: '/Page2',
        name:'新增用户',
        component: () => import('../views/Insert.vue'),
      },
      {
        path: '/Update',
        name:'更新用户',
        component: () => import('../views/Update.vue'),
      }
    ]
  },
  {
    path: '/office',
    name:'办公流程',
    component: () => import('../views/Index.vue'),
    children:[
      {
        path: '/page3',
      name:'页面3',
      component: () => import('../views/Page3.vue')
      },
      {
      path: '/page4',
      name:'页面4',
      component: () => import('../views/Page4.vue')
      },
    ]
  }
]


const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router